<!-- iframe -->
<template>
    <div class="iframe" :id="id">
        <iframe class="iframe" :src="element.data.url" :class="element.data.url === '' ? 'back' : ''" frameborder="0">
        </iframe>
    </div>

</template>

<script>
import register from '@/js/main/register.js';
export default {
    props: {
        element: {
            type: Object
        },
        id: {
            type: String
        }
    },
    data() {
        return {};
    },
    created() {
        register.addComponent(this);
    },
    destroyed() {
        register.removeComponent(this);
    }
};
</script>
<style lang='scss' scoped>
.iframe {
    width: 100%;
    height: 100%;
}
.back {
    background: #1a1f32cc;
    background-image: url('../../image/main/iframe.svg');
    background-size: 100% 100%;
}
.noback {
    background: #1a1f32cc;
}
</style>